An image forming apparatus such as a copying machine or a multifunction peripheral usually has a scanner function, by which to read an image of a document sheet. Such an image forming apparatus prints the image based on read image data, and/or transmits the read image data to another apparatus. Meanwhile, for user friendliness, reading of an image of a document sheet is carried out by the scanner function often with use of an auto document feeder (ADF).
Assume that an image of a document sheet is read with use of an auto document feeder. In this case, if there is dust or paper dust on a glass surface on a path of light for reading the document sheet, read image data will have line noise that is parallel to a sub scanning direction (such an image is referred to as a line noise image). Such line noise is visually noticeable, and therefore is desirably removed for the purpose of obtaining image data that is the same as the image of the document sheet.
Patent Literature 1 discloses a technique to remove line noise. According to this technique, pixel values of pixels constituting line noise in image data are replaced with pixel values found by linear interpolation from pixel values of neighboring pixels. Specifically, (i) a noise region is detected in input image data, (ii) correction pixel values to correct pixels in the noise region are found by linear interpolation from pixel values of pixels adjacent to a detected noise region, and (iii) the pixel values of the pixels in the noise region are replaced with found correction pixel values.
However, the technique described in Patent Literature 1 has the following problem. In a case where the line noise overlaps a texture such as halftone dots, the line noise remains unremoved because a replaced portion differs from the surrounding texture (see FIG. 14). FIG. 14 is an explanatory view showing a problem of a conventional line noise removal process disclosed in Patent Literature 1.
On the other hand, Patent Literature 2 proposes a technique to solve such a problem. Specifically, the technique described in Patent Literature 2 is a technique of replacing pixels in a line noise portion by a method allowing reproduction of a texture. That is, this technique is arranged to replace, pixels in a region to be replaced, with pixels in a region that is highly similar to pixels around the region to be replaced. According to such an arrangement, it is possible to remove line noise without leaving an unusual-looking portion in the texture, even in the case where the line noise overlaps a halftone dot region as described earlier (see FIG. 15). FIG. 15 is an explanatory view showing a conventional line noise removal process disclosed in Patent Literature 2.